#ifndef _RENDER_CAED_H_
#define _RENDER_CAED_H_

#include <Canvas.h>
#include "card.h"

class render_card :
    public animationagent::Widget
{
public:
    enum PlayerID {
        PLAYER_1,
        PLAYER_2,
    };

    render_card(enum PlayerID p, int index);
    virtual ~render_card(void);
    void set_backimage(SDL_Surface *image);
    void set_cardimage(SDL_Surface *image);
    void set_cardimage_s(SDL_Surface *image);
    void set_cardid(int id);
    void set_show_cardback(bool b);
    SDL_Surface *get_cardimage();
    virtual void draw(SDL_Surface *screen);
    virtual void update();

private:
    SDL_Surface *cardimage;
    SDL_Surface *cardimage_s;
    SDL_Surface *backimage;
    enum PlayerID player;
    int handindex;
    int cardid;
    bool show_cardback;
};

#endif
